package com.javachmapi.pay.modules.admin.controller;

import com.javachmapi.pay.modules.admin.entity.User;
import com.javachmapi.pay.modules.admin.service.UserService;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import javax.annotation.Resource;

/**
 * 用户表(User)表控制层
 *
 * @author 宋利军
 * @since 2020-07-18 18:12:14
 */
@RestController
@RequestMapping("/user")
@Api(value = "UserController", tags = "用户表", description = "")
public class UserController {
    /**
     * 服务对象
     */
    @Resource
    private UserService userService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/selectOne")
    @ApiOperation(value = "", notes = "")
    public User selectOne(Integer id) {
        return this.userService.queryById(id);
    }

}